import { Injectable } from '@angular/core';
import { User } from '../api';
import { Subject } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class UserService {
  me:User;
  private _event = new Subject<User>();
  public meEvent = this._event.asObservable();
  constructor() {

  }

  setMe(me:User){
    this.me = me;
    this._event.next(me);
  }

}
